<html>
<head>
<title>eLGU - Electronic Local Government Units Program</title>
<link href="css/elgu.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/md5.js"></script>
<script language="javascript">
<!--
  function doChallengeResponse() {
    str = document.login.username.value + ":" +
          document.login.password.value + ":" +
          document.login.challenge.value;

    document.login.response.value = MD5(str);
    document.login.password.value = "";
    document.login.submit();
  }
// -->
</script>
</head>
<body BGCOLOR=#6699CC LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<form name="login" action="<?php print $this->url() ?>" method=post>
<input type="hidden" name="challenge" value="<?php print $challenge ?>">
<input type="hidden" name="response"  value="">

<table width=800 border=0 cellpadding=0 cellspacing=0 align="center">
  <tr> 
    <td> <img src="images/login/login_01.gif" width=18 height=48 alt=""></td>
    <td> <img src="images/login/login_02.gif" width=27 height=48 alt=""></td>
    <td colspan=3> <img src="images/login/login_03.gif" width=711 height=48 alt=""></td>
    <td> <img src="images/login/login_04.gif" width=27 height=48 alt=""></td>
    <td> <img src="images/login/login_05.gif" width=17 height=48 alt=""></td>
  </tr>
  <tr> 
    <td> <img src="images/login/login_06.gif" width=18 height=135 alt=""></td>
    <td> <img src="images/login/login_07.gif" width=27 height=135 alt=""></td>
    <td colspan=3> <img src="images/login/login_08.gif" width=711 height=135 alt=""></td>
    <td> <img src="images/login/login_09.gif" width=27 height=135 alt=""></td>
    <td> <img src="images/login/login_10.gif" width=17 height=135 alt=""></td>
  </tr>
  <tr> 
    <td> <img src="images/login/login_11.gif" width=18 height=100 alt=""></td>
    <td> <img src="images/login/login_12.gif" width=27 height=100 alt=""></td>
    <td> <img src="images/login/login_13.gif" width=242 height=100 alt=""></td>
    <td> <img src="images/login/login_14.gif" width=241 height=100 alt=""></td>
    <td> <img src="images/login/login_15.gif" width=228 height=100 alt=""></td>
    <td> <img src="images/login/login_16.gif" width=27 height=100 alt=""></td>
    <td> <img src="images/login/login_17.gif" width=17 height=100 alt=""></td>
  </tr>
  <tr> 
    <td colspan=3> <img src="images/login/login_18.gif" width=287 height=68 alt=""></td>
    <td rowspan=2 width="241" height="141" bgcolor="#FFFFFF" align="left" valign="top"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>USERNAME</b></font></td>
        </tr>
        <tr> 
          <td align="center"> 
            <input type="text" name="username" value="<?php print (isset($this->auth["uname"]) ? $this->auth["uname"] : "" ) ?>"
                        style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; FONT-SIZE: 9pt; BACKGROUND: #cccccc; BORDER-LEFT: 0px; COLOR: #000000; BORDER-BOTTOM: 0px; FONT-FAMILY: verdana">
          </td>
        </tr>
        <tr> 
          <td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>PASSWORD</b></font></td>
        </tr>
        <tr> 
          <td align="center"> 
            <input type="password" name="password"
                        style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; FONT-SIZE: 9pt; BACKGROUND: #cccccc; BORDER-LEFT: 0px; COLOR: #000000; BORDER-BOTTOM: 0px; FONT-FAMILY: verdana">
          </td>
        </tr>
        <tr>
          <td align="center">
            <input onClick="doChallengeResponse(); return false;" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; FONT-SIZE: 8pt; BACKGROUND: #000000; BORDER-LEFT: 0px; COLOR: #ffffff; BORDER-BOTTOM: 0px; FONT-FAMILY: verdana" type="submit" value="ENTER" name="submitbtn">
          </td>
        </tr>
		<tr>
		  <td>
            <?php global $username; if ( isset($username) ): ?>
            <!-- failed login code -->
			   <font color="red" face="Arial, Helvetica, sans-serif" size="2">
			    <br><b>Invalid Login</b>. Please try again!<br>
			   </font>
            <?php endif ?>
		  </td>
		</tr>
      </table>
    </td>
    <td colspan=3> <img src="images/login/login_20.gif" width=272 height=68 alt=""></td>
  </tr>
  <tr> 
    <td> <img src="images/login/login_21.gif" width=18 height=73 alt=""></td>
    <td> <img src="images/login/login_22.gif" width=27 height=73 alt=""></td>
    <td> <img src="images/login/login_23.gif" width=242 height=73 alt=""></td>
    <td> <img src="images/login/login_24.gif" width=228 height=73 alt=""></td>
    <td> <img src="images/login/login_25.gif" width=27 height=73 alt=""></td>
    <td> <img src="images/login/login_26.gif" width=17 height=73 alt=""></td>
  </tr>
  <tr> 
    <td> <img src="images/login/login_27.gif" width=18 height=125 alt=""></td>
    <td> <img src="images/login/login_28.gif" width=27 height=125 alt=""></td>
    <td colspan=3> <img src="images/login/login_29.gif" width=711 height=125 alt=""></td>
    <td> <img src="images/login/login_30.gif" width=27 height=125 alt=""></td>
    <td> <img src="images/login/login_31.gif" width=17 height=125 alt=""></td>
  </tr>
  <tr> 
    <td> <img src="images/login/login_32.gif" width=18 height=51 alt=""></td>
    <td> <img src="images/login/login_33.gif" width=27 height=51 alt=""></td>
    <td colspan=3> <img src="images/login/login_34.gif" width=711 height=51 alt=""></td>
    <td> <img src="images/login/login_35.gif" width=27 height=51 alt=""></td>
    <td> <img src="images/login/login_36.gif" width=17 height=51 alt=""></td>
  </tr>
</table>
<p>&nbsp;</p>
<script language="JavaScript">
<!--
  // Activate the appropriate input form field.
  if (document.login.username.value == '') {
    document.login.username.focus();
  } else {
    document.login.password.focus();
  }
// -->
</script>
</form>

</body>
</html>